package com.assist.view
{
	public class LoadResponder
	{
		public var callback:Function;
		public var progress:Function;
		
		public function LoadResponder( callback :Function = null, progress :Function = null)
		{
			this.callback = callback;
			this.progress = progress;
		}
		
		public function lCallback() : void
		{
			callback();
		}// end function
		
		public function lProgress(param1:String, param2:int, param3:int, param4:int, param5:String) : void
		{
			//progress是函数
			if (progress is Function)
			{
				//根据progress函数的参数个数分类处理
				switch(progress.length)
				{
					case 2:
					{
						progress(param1, param2);
						break;
					}
					case 3:
					{
						progress(param1, param2, param3);
						break;
					}
					case 4:
					{
						progress(param1, param2, param3, param5);
						break;
					}
					case 5:
					{
						progress(param1, param2, param3, param4, param5);
						break;
					}
					default:
					{
						break;
					}
				}
			}
			return;
		}// end function
	}
}